import java.util.Vector;


public class Controler {
	
	private ProxyThread pt;
	private static Controler instance;
	
	private Controler()
	{
		
	}
	
	public static Controler instance()
	{
		if (instance == null)
			instance = new Controler();
		return instance;
	}
	
	public void startProxy()
	{
		if (pt == null)
			this.pt = new ProxyThread("localhost", 4242, "10.22.2.17", 25565, System.out, System.err);
		pt.start();
	}
	
	public void stopProxy()
	{
		if (pt != null)
			this.pt.stopProxy();
		pt = null;
	}
	
	public Vector<StreamCopyThread> getConnections()
	{
		return this.pt.getConnections();
	}
}
